<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript">
		// var a = 1;		//定义a，并且赋值1
		// var b = 2;		//定义b，并且赋值2
		// a = b;			//就是将b的值给a，b的值不变。所以a就是2了，b是2不变。
		// console.log(a);	//2
		// console.log(b);	//2


		// var a = 1;
		// var b = 2;
		// b = a;			//将a的值给b，a的值不变，所以b就是1了，a还是1不变
		// console.log(a);
		// console.log(b);

		// var a = 1;			//定义a变量，值是1
		// var b = 2;			//定义b变量，值是2
		// a = b + 3;			//将5赋值给a，b的值还是2。
		// b = a + 4;			//将9赋值给b，a的值还是5
		// console.log(a);		//5
		// console.log(b);		//9

		// 						//a		b       c
		// var a = 1;              //1
		// var b = 2;              //1     2
		// var c = 3;              //1     2       3
		// a = b + c;              //5     2       3
		// b = c - a;              //5     -2      3
		// c = a * b;              //5     -2      -10
		// console.log(a);
		// console.log(b);
		// console.log(c);

		// 						//a    b     c
		// var a = 1;
		// var b = 2;
		// var c = 3;              //1     2     3
		// a = a + b;              //3     2     3
		// b = b + a;              //3     5     3
		// c = c + b;              //3     5     8
		// console.log(a);  //3
		// console.log(b);  //5
		// console.log(c);  //8

		// 					//a       b  
		// var a = "1";
		// var b = 2;          //"1"     2
		// a = a + b;          //"12"    2
		// b = b + a;          //"12"    "212"
		// console.log(a);     //输出12
		// console.log(b);     //输出212

		// var a = "1+2";     //字符串
		// var b = 3;         
		// a = a + b;         //拼接
		//console.log(a);	  //输出1+23

						  //a         b
		var a = "1";
		var b = 2;
		a = b + a;       //"21"       2
		b = b + a;       //"21"       "221"
		console.log(a);  //21
		console.log(b)   //221
	</script>
</body>
</html>